#ifndef __MONITOR_H__
#define __MONITOR_H__

enum MONITOR_TID /* thread id */ {
    MONITOR_TID_US100,  /* plane_height_detect thread id */
    MONITOR_TID_WTD,    /* plane_height_watchdog thread id */
};
extern pthread_t monitor_tid_ary[];

#define US100_HEALTH_VALUE 1
extern int us100_health;
/* us100-thread keep refresh us100_health = 5,
 * means it's health.
 * if you want to detect its health status,
 * us100_health-- less than once per second,
 * and check it whether less than 0,
 * if it's health, than it will never be zero
 */


/* core threads entry */
void *plane_height_watchdog(void *ary);
void *plane_height_detect(void *ary);

/* signal handler */
void wait_child_to_die(int signum);

#endif /* __MONITOR_H__ */
